<?php

$this->registerCssFile('@static/css/new_star_info.css');

$showName = '';
if(stripos($star['nick_name'],$star['name'])){
    $showName =  $star['nick_name'];
}else{
    $showName =  $star['name'].'('.$star['nick_name'].')';
}
$showName =  $star['name'].'('.$star['nick_name'].')';
$jsString = <<<js
    $(function(){
        $('div.tab_nav ul li').click(function(){
            var liIndex = $(this).index();
            if(liIndex == 0) return;
            var top = $('div.main_l ul').eq(liIndex - 1).position().top;
            
            if(liIndex < 3){
                top = 550 * liIndex;                
            }
            if(liIndex == 3){
                top = top - 120;
            }            
            $('html, body').animate({  
                scrollTop: top
            }, 200);
                                          
        });               
    });
    
    function changeStar() {
       $.get("/ajax/meinv/change-stars.html",function(json){
                $("#recommendStar").html(json);
       });
    }
    function changePortray() {
       $.get("/ajax/meinv/change-portrays.html",function(json){
                $("#recommendPortray").html(json);
       });
    }
js;
$this->registerJs($jsString,\yii\web\View::POS_END);

$this->title = "{$showName}【个人资料 最新热点资讯 写真照片 】-果图网";
$this->registerMetaTag([
    'name'=>'description',
    'content'=>"果图网(guotuw.com)搜集了{$showName}最全最新的个人资料,包括生日,身高,体重,三围,职业等," . mb_substr($star['desc'],0,30)
]);

?>
<div class="main">
    <!--位置导航-->
    <div class="place_nav wrapper">
        <a href="<?=Yii::$app->request->getHostInfo();?>" class="icon_home"><em></em></a>
        <a href="<?=Yii::$app->request->getHostInfo();?>">果图网</a>>
        <a href="/meinv/">美女大全</a>>
        <?=$showName?>
    </div>

    <!--明星介绍-->
    <div class="star_info">
        <div class="star_box wrapper">
            <img src="<?=$star['header']?>" title="<?=$showName?>" alt="<?=$showName?>" />
            <div class="star_detail">
                <div class="title">
                    <strong><?=$showName?></strong>
                    <?php if(intval($star['star_sign']) > 0) echo '<em>',Yii::$app->params['starSign'][$star['star_sign']],'</em>';?>
                </div>
                <div class="txt"><?=$attrString?></div>
                <div class="star_pmfans"><em class="phnum">本周排名：NO.58<i></i></em><em class="fansnum"><i></i>浏览量：<?=$star['view']?></em></div>
            </div>
            <span class="star_cz">
                <em class="starbtn chongxing1"><i></i>宠幸TA</em>
                <em class="starbtn chongxing2" style="display:none"><i></i>你失宠了</em>
                <em class="starbtn qiandao1" style="display:none"><i></i>签到</em>
                <em class="starbtn qiandao2"><i></i>已签到</em>
            </span>
            <div class="clear"></div>
        </div>
    </div>

    <!--介绍导航-->
    <div class="tab_nav"><div class="wrapper">
            <ul>
                <li class="cur"><a href="javascript:void(0);">明星主页</a></li>
                <li><a href="javascript:void(0);">最新新闻</a></li>
                <?php if(!empty($portrays)):?> <li><a href="javascript:void(0);">写真作品集</a></li><?php endif;?>
                <li><a href="javascript:void(0);">热门女星</a></li>
                <li><a href="javascript:void(0);">推荐写真</a></li>
            </ul>
        </div></div>

    <div class="star_content">
        <div class="wrapper">
            <p><?=$star['desc']?></p>
        </div>
    </div>

    <div class="wrapper">
        <div class="main_l fl">
            <!--新闻-->
            <h2 ><a href="/news/" target="_blank">查看更多</a>最新新闻</h2>
            <ul class="new_list">
                <?php foreach ($news as $newInfo):?>
                    <li>
                        <a title="<?=$newInfo['title']?>" href="/news/<?=$newInfo['id']?>.html">
                            <img title="<?=$newInfo['title']?>" alt="<?=$newInfo['title']?>" src="<?=$newInfo['image']?>" />
                            <strong><?=$newInfo['title']?></strong>
                        </a>
                        <span>浏览量：<?=$newInfo['view']?><i></i><?=date('Y-m-d',$newInfo['create_time'])?></span>
                    </li>
                <?php endforeach; ?>
            </ul>

            <!--作品写真集展示完-->
            <?php if(!empty($portrays)):?>
            <h2 class="mt20">写真作品集</h2>
            <ul class="works">
                <?php foreach ($portrays as $portray):?>
                    <li><a href="/xiezhen/<?=$portray['id']?>.html" title="<?=$portray['title']?>"><img title="<?=$portray['title']?>" alt="<?=$portray['title']?>" src="<?=$portray['y_img']?>" /></a></li>
                <?php endforeach;?>
            </ul>
            <div class="clear"></div>
            <?php endif;?>

            <div id="recommendStar">
                <?php echo $this->render('recommendStar',['recommendStars' => $recommendStars]);?>
            </div>

            <div id="recommendPortray">
                <?php echo $this->render('recommendPortray',['recommendPortrays' => $recommendPortrays]);?>
            </div>
        </div>

        <div class="main_r fr">
            <?php echo $this->render('hotStar',['stars' => $stars]);?>

            <?php echo  $this->render('/layouts/hotTags');?>
        </div>

        <div class="clear"></div>

    </div>
</div>